package
{
	import flash.desktop.NativeApplication;
	import flash.events.Event;
	
	import mx.controls.Alert;
	import mx.events.CloseEvent;
	import mx.events.MenuEvent;
	
	public class MenuItemClass
	{
		public function MenuItemClass()
		{
		}
		
		private function noexe():void {
			Alert.show("暂不提供!");
		}
		
		public function itemClickHandler(e:Event):void {
			var _e:MenuEvent = MenuEvent(e);
			switch(_e.label) {
				case "打开":
					noexe();
				break;
				case "保存":
					noexe();
				break;
				case "另存为...":
					noexe();
				break;
				case "退出":
				Alert.show("确定退出吗？","提示",Alert.YES|Alert.NO,null,function(e:CloseEvent):void{
					if(e.detail == Alert.YES) {
						NativeApplication.nativeApplication.exit();
					}
				});
				break;
				case "剪切":
				
				break;
				case "复制":
				
				break;
				case "粘贴":
				
				break;
				
				case "全选":
				
				break;
				
				case "查找/替换":
				
				break;
				
				case "查找下一个":
				
				break;
				
				case "查找上一个":
				
				break;
				
				case "使用说明":
				
				break;
				
				case "关于":
				
				break;
			}
		}

	}
}